package util;

import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class MyUtility {

  
    public static String getCurrentDate(String dateFormat, Locale locale) {
        SimpleDateFormat sf = new SimpleDateFormat(dateFormat, locale);
        //SimpleDateFormat sf = new SimpleDateFormat( "yyyy/MM/dd" );
        //SimpleDateFormat sf = new SimpleDateFormat( "yyyy/MM/dd", Locale.KOREA );
        //SimpleDateFormat sf = new SimpleDateFormat( "MM/dd/yyyy" );
        //SimpleDateFormat sf = new SimpleDateFormat( "MMM. dd yyyy", Locale.ENGLISH );
        //SimpleDateFormat sf = new SimpleDateFormat( "MMMMM dd yyyy", Locale.US );
        //SimpleDateFormat sf = new SimpleDateFormat( "MM/dd/yyyy a hh:mm:ss" );
        //SimpleDateFormat sf = new SimpleDateFormat( "MM/dd/yyyy a HH:mm:ss" );

        String currentDate = sf.format( new Date() );
        return currentDate;
    }
  
   
    public static String getCurrentDate(String dateFormat) {
        return getCurrentDate(dateFormat, Locale.KOREA);
    }

  
    public static String getCurrentDate() {
		return getCurrentDate("yyyy/MM/dd");
    }
	
  
    public static String getCurrency(double myNumber) {
		//return getCurrency(myNumber, Locale.KOREA);
		return NumberFormat.getCurrencyInstance().format(myNumber);
    }
	
    
    public static String getCurrency(double myNumber, Locale locale) {
		NumberFormat cf = NumberFormat.getCurrencyInstance(locale);
		return cf.format(myNumber);
    }	

}
